/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/


// testpgl.h : main header file for the TESTPGL application
//

#if !defined(AFX_TESTPGL_H__02996854_8623_11D4_826B_00A024D26A1F__INCLUDED_)
#define AFX_TESTPGL_H__02996854_8623_11D4_826B_00A024D26A1F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	virtual BOOL OnInitDialog();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CTestpglApp:
// See testpgl.cpp for the implementation of this class
//

class CTestpglApp : public CWinApp
{
public:
	CPGLRegionPtr GenerateRegion();
	CTestpglApp( );

	void SetIdleView (CView* pView) {	m_pIdleView = pView;	m_tStart = clock();};
	void SetAnimatedLine(CPGLRegionStPtr pRegion) 	
	{	
		if (!pRegion) 
			m_pAnimatedLine.reset(); 
		else 
			m_pAnimatedLine = TPGLPoolSingleton<CPGLLine2D>::Find(m_uLineID);
	};
	void SetScatter(CPGLScatter* pScatter, CPGLDialog* pScatterDlg) {	m_pScatter = pScatter; m_pScatterDlg = pScatterDlg;};
	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestpglApp)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	virtual BOOL OnIdle(LONG lCount);
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CTestpglApp)
	afx_msg void OnAppAbout();
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
protected:
	void AnimateLine();
//	ULONG_PTR m_ulGdiplusToken;
	gfxinterface::CGDIpInitializer m_GDIpInitializer;

	CView* m_pIdleView;
	CPGLLine2DStPtr m_pAnimatedLine;
	CPGLScatter* m_pScatter;
	CPGLDialog* m_pScatterDlg;
	clock_t m_tStart;
	UINT m_uLineID;
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTPGL_H__02996854_8623_11D4_826B_00A024D26A1F__INCLUDED_)
